package com.shensi.api.admin.client.monitor;

import com.shensi.api.admin.client.fallback.monitor.SysOperlogClientFallBack;
import com.shensi.api.admin.client.fallback.system.SysDicTypeClientFallBack;
import com.shensi.api.admin.domian.system.SysOperLog;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import com.shensi.common.core.utils.poi.ExcelUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysOperlogClientFallBack.class)
@Component
public interface SysOperlogClient {

    @GetMapping("/monitor/operlog/list")
    public TableDataInfo list(@SpringQueryMap SysOperLog operLog);

    @GetMapping("/monitor/operlog/export")
    public AjaxResult export(@SpringQueryMap SysOperLog operLog);

    @DeleteMapping("/monitor/operlog/{operIds}")
    public AjaxResult remove(@PathVariable("operIds") Long[] operIds);


    @DeleteMapping("/monitor/operlog/clean")
    public AjaxResult clean();


    @PostMapping("/monitor/operlog/insertOperlog")
    public void insertOperlog(@RequestBody SysOperLog operLog);
}
